package DAO;

import java.sql.ResultSet;

import POJO.Language;
import Util.MySqlDataAccessHelper;

public class languageDAO {
	public static Language getValueKey(String key,String lang){
		Language langu=new Language();
		MySqlDataAccessHelper helper=new MySqlDataAccessHelper();
		try{
			//System.out.println("key: "+key);
			String sql="select * from language la where la.Key='"+key+"'";
			helper.open_en();
			ResultSet rs=helper.executeQuery(sql);
			System.out.println(sql);
			while(rs.next()){	
			//	System.out.println("rs.getString: "+rs.getString("Value"));
				langu=new Language();
				langu.setKey(rs.getString("Key"));
				langu.setValue(rs.getString("Value"));
			}
		}catch(Exception ex){
			ex.getMessage();
		}
		return langu;
	}

}
